package com.by.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sku")
public class Sku {

    @TableId(value = "sku_id",type = IdType.AUTO)
    private Integer skuId;

    /**
     * SPU id
     */

    private Integer spuId;

    /**
     * 多个销售属性值id逗号分隔
     */
    private String attrs;

    /**
     * sku名称
     */
    private String skuName;

    /**
     * sku图片
     */
    private String imgUrl;

    /**
     * 售价，整数方式保存
     */
    private int priceFee;

    /**
     * 市场价，整数方式保存
     */
    private int marketPriceFee;

    /**
     * 商品编码
     */
    private String partyCode;

    /**
     * 商品条形码
     */
    private String modelId;

    /**
     * 商品重量
     */
    private double weight;

    /**
     * 商品体积
     */
    private double volume;

    /**
     * 状态 1:enable, 0:disable, -1:deleted
     */
    private Integer status;

    @TableField(exist = false)
    //实际库存
    int actual_stock;
}
